package com.authapi.sample.api.entity;

import com.authapi.sample.api.model.Tree.Itree;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;


import java.beans.Transient;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author Baomidou
 * @since 2024-09-26
 */
@Data
public class Menu implements Serializable, Itree<Menu> {

    private static final long serialVersionUID = 1L;

    private String id;

    private String name;

    private String path;

    private String parentId;

    @TableField(exist = false)
    private ArrayList<Menu> children;


    @Override
    public void setChildren(ArrayList<Menu> menus) {
        this.children = menus;
    }
    @Override
    public ArrayList<Menu> getChildren() {
        return  this.children;
    }
}
